<?php
namespace app\admin\model;
use think\Loader;
use think\Model;
use think\Validate;

class EvaluateModel extends Model
{
    protected $pk = 'id';//主键
    //设置当前模型对应的完整数据表名称
    protected $table = 'fly_evaluate';
    //后台用户中心数据

    //获取评论
    public function EvaluateList()
    {
    	$EvaluateList = db('evaluate')
                        ->alias('e')
                        ->field('e.*,u.*,u.name uname,c.name cname')
                        ->join('fly_user u','u.id=e.user_id')
                        ->join('fly_card c','c.id=e.card_id')
                        ->select();
    	// dump($EvaluateList);die;
    	return $EvaluateList;
    }

}


